home *** CD-ROM | disk | FTP | other *** search
/ Mesolore / Mesolore - Disc 2.iso / mac / data / Nuttall.dir / 00001_Script_MovieScript 1 next >
Text File  |  2001-01-30  |  8KB  |  350 lines

  1. global gretracelist,preRo, preRx, preCdx, cdxDestList, cdxScroll, cdxNew, MNDestList, cdxLookupList, cdxLookupIdx, searchList, searchAttrLn, foundNamesLn, findList, searchRtn
  2.  
  3. Global gShowBalloons, gShowText, gShowOrder, gIndex,glastPic,gshowSearch,gShowLeftPanel
  4. ---utilities
  5. on createCrossIndex
  6.   holder = ""
  7.   repeat with x = 767 to 1985
  8.     go frame x
  9.     set temp = the memberNUm of sprite 30
  10.     if temp <> 0 then
  11.       put the frame & "," & temp & RETURN after holder
  12.     end if
  13.   end repeat
  14.   put holder into field "crossRef"
  15. end
  16.  
  17.  
  18. on setFieldSize
  19.   beginRecording
  20.     repeat with x = 767 to 1985
  21.       go frame x
  22.       if the type of the member of sprite 30 =#field then
  23.         
  24.         
  25.         
  26.         --        set the boxType of member which = #fixed
  27.         set the rect of the member of sprite 30 = rect(0, 0, 140, 280)
  28.         set the locv of sprite 30 = 118
  29.           set the loch of sprite 30 = 21
  30.       end if
  31.     end repeat
  32.   endRecording
  33.   beep
  34. end
  35.  
  36.  
  37. on createindex
  38.   set templist = ""
  39.   put "" into field "index"
  40.   repeat with x = 461 to 959
  41.     
  42.     if the mousedown then 
  43.       if the controldown then
  44.         put templist into field "index"
  45.         abort
  46.       else
  47.         put x
  48.       end if
  49.     end if
  50.     put indexLine( x ) into line (x - 460) of templist
  51.     
  52.   end repeat
  53.   
  54.   put templist into field "index"
  55. end
  56.  
  57. on indexLine which
  58.   set which="%"&which
  59.   set temp = field "balloons1"
  60.   if temp contains which then
  61.     set howMany = the number of lines in temp
  62.     repeat with x = 1 to howMany
  63.       if line x of temp contains which then
  64.         return "1,"&x
  65.         exit repeat
  66.       end if
  67.     end repeat
  68.     
  69.   else
  70.     set temp = field "balloons2"
  71.     set howMany = the number of lines in temp
  72.     repeat with x = 1 to howMany
  73.       if line x of temp contains which then
  74.         return "2,"&x
  75.         exit repeat
  76.       end if
  77.     end repeat
  78.   end if
  79. end
  80.  
  81. --
  82. --on setupMIAW windowName, windowFile, wType
  83. --  set the fileName of window windowName to windowFile
  84. --  if wtype= "void" then
  85. --    set the windowType of window windowName to 2
  86. --  else
  87. --    set the windowType of window windowName to wType
  88. --  end if
  89. --end setupMIAW
  90.  
  91.  
  92. on setTextRow
  93.   set x = value(char 2 to 3 of the framelabel)
  94.   if x = 19 then 
  95.     if item 1 of the framelabel = "n19a" then
  96.       set whLine = value(item 1 of line (x -13) of field "textWindowlist")
  97.     else
  98.       set whLine = value(item 2 of line (x -13) of field "textWindowlist")
  99.     end if
  100.   else
  101.     set whLine = value(line (x -13) of field "textWindowlist")
  102.   end if
  103.   tell window "Nuttall Text" to set where = getAt(charPosToLoc(member "info", whLine),2)  - the lineheight of  member "info"
  104.   tell window "Nuttall Text" to  sendSprite(16,#CustomScrollbar_SetScroll,where)
  105. end
  106.  
  107.  
  108.  
  109. ---Leftlabs panel
  110.  
  111. on showleftPanel
  112.   if sprite(90).locH > 0 then
  113.     gShowLeftPanel=false
  114.     hideSprite [56,90,91,92,93,94,115]
  115.     repeat with x = 95 to 99
  116.       set the visible of sprite x = FALSE
  117.     end repeat
  118.   else
  119.     gShowLeftPanel=TRUE
  120.     showSprite [56,90,91,92,93,94,115]
  121.     repeat with x = 95 to 99
  122.       set the visible of sprite x = TRUE
  123.     end repeat
  124.   end if
  125.   unroll 56
  126.   updatestage
  127. end
  128.  
  129. on checkRollLeft
  130.   
  131.   if gshowBalloons then 
  132.     set the member of sprite(92) = "showballoons_x"
  133.   else
  134.     set the member of sprite(92) = "showballoons_n"
  135.   end if
  136.   if gShowText then 
  137.     set the member of sprite(94) = "ShowText_x"
  138.   else
  139.     set the member of sprite(94) = "ShowText_n"
  140.   end if
  141.   if gShowOrder then 
  142.     set the member of sprite(93) = "ShowOrder_x"
  143.   else
  144.     set the member of sprite(93) = "ShowOrder_n"
  145.   end if
  146.   repeat with x = 91 to 94
  147.     if rollover(x) then
  148.       roll x
  149.     else
  150.       unroll x
  151.     end if
  152.   end repeat
  153.   go the frame
  154. end
  155.  
  156. --- right labs panel
  157.  
  158. on checkRollPanel()
  159.   checkRollLeft
  160.   rolled = FALSE
  161.   repeat with x in [90,102,103,104,105,106,107,108,109]
  162.     if rollover(x) then
  163.       roll x
  164.       rolled = TRUE
  165.     else
  166.       unroll x
  167.     end if
  168.   end repeat
  169.   return rolled
  170. end
  171.  
  172. on showPanel
  173.   if sprite(103).locH > 0 then
  174.     hideSprite [103,104,105,106,107,108,109]
  175.   else
  176.     showSprite [103,104,105,106,107,108,109]
  177.   end if
  178. end
  179.  
  180.  
  181.  
  182.  
  183.  
  184. on setcursor a,b
  185.   if the machinetype = 256 then
  186.     cursor [value(a),value(a)+1]
  187.   else
  188.     cursor b
  189.   end if
  190. end
  191.  
  192. --- labs balloons, text, order
  193. on showBalloons
  194.   set glastPic = ""
  195.   set gShowBalloons= not gShowBalloons
  196.   set the visible of sprite 60=FALSE
  197.   set the visible of sprite 61=FALSE
  198.   updatestage
  199. end 
  200.  
  201. on showSearch
  202.   set gshowSearch= not gshowSearch
  203.   if gshowSearch = TRUE then 
  204.     open window "Nuttall Search"
  205.     set the windowtype of window "Nuttall Search" = 4
  206.   else
  207.     close window "Nuttall Search"
  208.   end if
  209. end
  210.  
  211. on SearchLocate which
  212.   temp = field "crossRef"
  213.   set hMany = the number of lines in temp
  214.   repeat with x = 1 to hMany
  215.     if item 2 of line x of temp = which then
  216.       sprite(60).visible = false
  217.       sprite(61).visible = false
  218.       goto item 1 of line x of temp
  219.       exit repeat
  220.     end if
  221.   end repeat
  222.   
  223. end
  224.  
  225. on showText
  226.   set gshowText= not gshowText
  227.   if gshowText = TRUE then 
  228.     open window "Nuttall Text"
  229.     set the windowtype of window "Nuttall Text" = 4
  230.   else
  231.     close window "Nuttall Text"
  232.   end if
  233.   
  234. end 
  235.  
  236. on showOrder
  237.   set gShowOrder = not gShowOrder
  238.   if gShowOrder = TRUE then 
  239.     repeat with x = 4 to 7
  240.       set the visible of sprite x = TRUE
  241.     end repeat
  242.   else
  243.     repeat with x = 4 to 7
  244.       set the visible of sprite x = FALSE
  245.     end repeat
  246.   end if
  247.   updatestage
  248. end 
  249.  
  250. --- prepare, start, stop movie
  251. on prepareMovie
  252.   hidesprite [100]
  253.   hidesprite [101]
  254.   
  255.   if voidp(gShowBalloons) then gShowBalloons = FALSE
  256.   gShowText = FALSE
  257.   gShowSearch = FALSE
  258.   if voidp(gShowOrder) then  gShowOrder = FALSE
  259.   if not gShowOrder then
  260.     repeat with x = 5 to 7
  261.       set the visible of sprite x = FALSE
  262.     end repeat
  263.   end if
  264.   puppetsprite 60, TRUE 
  265.   puppetsprite 61, TRUE 
  266.   
  267.   updatestage
  268.   if gRetraceList = void then set gRetraceList = ["Home*Intro"]
  269.   set the visible of sprite 54 = false
  270.   showPanel
  271.   if not gShowLeftPanel = true then
  272.     showLeftPanel
  273.   end if
  274.   set the visible of sprite 61 = false
  275.   
  276.   cursor 4
  277.   --    set hMany = the number of members of castLib 2
  278.   --    repeat with x = 1 to hMany
  279.   --      if the type of member x of castlib 3 = #field then
  280.   --        set the scrolltop of member x of castlib 3= 0
  281.   --      end if
  282.   --    end repeat
  283.   --    updatestage
  284.   cursor 0
  285.   set gIndex = field "Index"
  286. end
  287.  
  288.  
  289.  
  290. on StartMovie
  291.   
  292.   
  293.   
  294.   
  295.   set MNDestList = value(field "MNScriptTxt")
  296.   
  297. end
  298.  
  299.  
  300.  
  301.  
  302.  
  303. on GenEnterCdx
  304.   set cdxNew = FALSE
  305. end
  306.  
  307. on GenLeaveCdx
  308.   set the visible of sprite 60 = FALSE
  309.   set the visible of sprite 61 = FALSE
  310. end
  311.  
  312. on GoCdxMN action
  313.   if action <> "Nothing" then
  314.     GenLeaveCdx
  315.     if word 1 of action = "go" then  --- skb
  316.       put "goto" into  word 1 of action --- skb
  317.     end if--- skb
  318.     
  319.     do(action)
  320.     
  321.   end if
  322. end
  323.  
  324.  
  325. on GoMNCdx dest
  326.   if gShowOrder = FALSE then
  327.     repeat with x = 4 to 7
  328.       set the visible of sprite x = FALSE
  329.     end repeat
  330.   end if
  331.   
  332.   --  SetSearch("off", "visible", FALSE)
  333.   goto dest
  334.   GenEnterCdx
  335. end
  336.  
  337.  
  338.  
  339. on GoMNMN frLabel, sprNum
  340.   set btnList = getAProp(MNDestList, frLabel)
  341.   set btnDest = getAProp(btnList, sprNum)
  342.   if btnDest contains ",MR0" then
  343.     beep
  344.   else
  345.     goto btnDest
  346.   end if
  347. end
  348.  
  349.  
  350.